<h1>"<?php echo $album?>" зургууд</h1>

<?php echo link_to('зургийн цомгууд', 'gallery/index', array('class'=>'title'))?>
<span class="separator"> | </span>
<?php echo link_to('цомог нэмэх', 'gallery/new', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('"'.$album.'" зургууд', 'gallery/images?albumId='.$albumId, array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('зураг оруулах', 'gallery/newImage?albumId='.$albumId, array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<?php foreach ($pager->getResults() as $image): ?>
  <div style="position:relative;width:124px;height:120px;overflow:hidden;padding:2px;float:left;margin:5px;border:1px solid #ccc;">
    <?php echo image_tag('/uploads/gallery/'.$image->getFullPath(120), array('alt'=>$image, 'title'=>$image, 'style'=>'float:left; max-width:120px; max-height:120px;'))?>
    
    <a style="position:absolute;bottom:-1px;right:12px;" href="<?php echo url_for('gallery/editImage?id='.$image->getId()) ?>"><?php echo image_tag('icons/edit.gif', array())?></a>
    <a style="position:absolute;bottom:0px;right:0px;" onclick="return confirm('Та итгэлтэй байна уу?')" href="<?php echo url_for('gallery/deleteImage?id='.$image->getId()) ?>"><?php echo image_tag('icons/delete.gif', array())?></a>
  </div>
<?php endforeach; ?>

<?php echo pager($pager, 'gallery/images?albumId='.$albumId)?>